package org.ns.longhttp.example;

import org.ns.longhttp.push.PushClient;

import java.text.SimpleDateFormat;
import java.util.Date;

public class PushDemo {

    public static void main(String[] args) throws Exception{
        PushClient client = new PushClient();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        while (true) {
            Thread.sleep(3000);
            String msg = "测试消息(3秒输出一次), 时间:" + dateFormat.format(new Date());
            client.push("http://152.136.204.218:11111/test", "text", msg);
        }
        // client.close();
    }
}
